﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Twodi.Structs;
using Microsoft.Xna.Framework.Graphics;
using Twodi.Behavior;
using Twodi.Aspect.Interfaces;
using Twodi.Behavior.Implemented;

namespace Twodi.Implemented
{
    public class Animated : Sprite
    {
        public Animated(Texture2D texture, Game game)
            : base(texture, game)
        {
            InitializeAnimations();
        }

        public Animated(string textureName, Game game)
            : base(textureName, game)
        {
            InitializeAnimations();
        }

        protected void InitializeAnimations()
        {
            AnimationBehavior = new AnimationBehavior(this);
        }

        public override void Update(GameTime gameTime)
        {
            AnimationBehavior.Update(gameTime);
            base.Update(gameTime);
        }

        public AnimationBehavior AnimationBehavior
        {
            get;
            set;
        }
    }    
}
